const express = require("express");
const mysql = require("../../model/core")
const router = express.Router()

const ManagerModel = require("../../model/managerModel")

router.get("/", (req, res) => {
  res.send("管理员管理页面")
})

router.get("/add", (req, res) => {
  var result = new ManagerModel({
    username: "alive",
    password: "123456"
  })
  result.save((err) => {
    if (err) {
      console.log(err)
      return
    }
    console.log("增加管理员成功!")
  })
  res.send("增加管理员")
})



module.exports = router